<div class="admin edit category filters">

	<h1><?php echo _('Фильтры'); ?></h1>


	<form action="" method="post">

		<?php if($oRow && $oRow->id > 0): ?>
			<input type="hidden" name="property_id" value="<?php echo $oRow->id; ?>" />
		<?php endif; ?>

		<div class="clear"></div>

		<div class="item">
			<label>Тип</label>
			<select class="select" name="type">
				<?php foreach($aTypes as $i => $type): ?>
				<option <?php echo $oRow->type == $i ? 'selected=""': ''; ?> value="<?php echo $i; ?>"><?php echo $type; ?></option>
				<?php endforeach; ?>
			</select>
		</div>

		<div class="item">
			<label>Назва</label>
			<input type="text" name="title" value="<?php echo !empty($oRow->title) ? $oRow->title : ''; ?>" />
		</div>

		<div class="item"><label>Значения</label></div>
		<?php
		if(!empty($oValues))
		{
			$valIndex = 2;
			foreach($oValues as $oValue)
			{
				$valIndex+=1;
		?>
		<div class="item">
			<input type="text" name="value[]" value="<?php echo !empty($oValue->value) ? $oValue->value : ''; ?>" />
			<input type="hidden" name="value_id[]" value="<?php echo !empty($oValue->id) ? $oValue->id : ''; ?>" />
		</div>
		<?php
			}
		}
		?>

		<div class="item template">
			<input type="text" name="value[]" value="" />
			<input type="hidden" name="value_id[]" value="" />
		</div>

		<div class="clear"></div>

		<div class="item btn">
			<button type="submit"><span>Зберегти</span></button>
		</div>
	</form>
</div>